package org.eiahe.hr.performance.domain;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.ehe.common.mybatis.core.domain.BaseEntity;

import java.math.BigDecimal;

/**
 * 绩效评分明细表
 *
 * @author zhangnn
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("hr_performance_score_detail")
public class PerformanceScoreDetail extends BaseEntity {

    /**
     * 明细ID
     */
    @TableId(value = "detail_id", type = IdType.AUTO)
    private Long detailId;

    /**
     * 租户ID
     */
    private String tenantId;

    /**
     * 结果ID
     */
    private Long resultId;

    /**
     * 评分ID
     */
    private Long scoreId;

    /**
     * 指标ID
     */
    private Long indicatorId;

    /**
     * 评分人
     */
    private String scorer;

    /**
     * 得分
     */
    private BigDecimal score = BigDecimal.ZERO;

    /**
     * 权重
     */
    private BigDecimal weight;

    /**
     * 加权得分
     */
    private BigDecimal weightedScore;

    /**
     * 评分状态(0未评分 1已评分 2弃权)
     */
    private String scoreStatus = "0";

    /**
     * 删除标志(0存在 1删除)
     */
    @TableLogic
    private String delFlag;

    /**
     * 创建者
     */
    @TableField(fill = FieldFill.INSERT)
    private Long createBy;

    /**
     * 更新者
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateBy;
}
